/*
Copyright (C) 2022-2024 Inspur Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/
package wsreg

import (
	"did-service/controller"

	"github.com/emicklei/go-restful"
)

func RegisterApiWebService(ws *restful.WebService, controller *controller.DidController) {
	ws.Path("/v1/api").Route(ws.GET("/did/resolve/{did}").To(controller.DidResolve)).
		Route(ws.GET("/did/dereference/{didURL}").To(controller.DidDereference))
	ws.Route(ws.POST("/user/register").To(controller.RegisterUserAndGetApiKey))
	ws.Route(ws.POST("/credential/apply").To(controller.ApplyVcWithoutDid))
	ws.Route(ws.POST("/did/apply").To(controller.ApplyDidByApiKey))
	ws.Route(ws.POST("/vp/apply").To(controller.ApplyVpByApiKey))
}
